import Mock from "mockjs";

Mock.mock("/api/login", "post", {
  code: 0,
  msg: "",
  data: {
    token:
      "GJbH6-xiC8SbIm1NHQ0FPcSgaUgFYaJkYL0sT687BDXKPq_tI5CXXxY87BCfo1sHPa-H2SmQqfVWANTGr7AVUltXqJKKmPYK6IekpxVs67I",
    user: {
      blogName: "@csentence()",
      avatar: '@img("300x250", "@color", "#fff", "@ctitle")',
      github: "https://github.com/simple-123",
      email: "@email",
      wechat: "simple-123",
      qq: "31433246",
    },
  },
});

Mock.mock(/^\/api\/whoami(\?.+)?$/, "get", {
  code: 0,
  msg: "",
  data: {
    token:
      "GJbH6-xiC8SbIm1NHQ0FPcSgaUgFYaJkYL0sT687BDXKPq_tI5CXXxY87BCfo1sHPa-H2SmQqfVWANTGr7AVUltXqJKKmPYK6IekpxVs67I",
    user: {
      blogName: "@csentence()",
      avatar: '@img("300x250", "@color", "#fff", "@ctitle")',
      github: "https://github.com/simple-123",
      email: "simple@example.com",
      wechat: "simple-123",
      qq: "31433246",
    },
  },
});

Mock.mock("/api/loginout", "get", {
  code: 0,
  msg: "",
  data: {},
});
